package com.shrcl.engineerprocess.domain.impl;

import com.shrcl.engineerprocess.domain.ProductCategory;
import com.shrcl.engineerprocess.domain.ProductCategoryDAO;
import com.shrcl.engineerprocess.domain.impl.ProductCategoryImpl;
import edu.fudan.mylang.pf.BaseDAOService;
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.springframework.stereotype.Service;

@Service("com.shrcl.engineerprocess.domain.ProductCategoryDAO")
public class ProductCategoryDAOImpl extends BaseDAOService<ProductCategory> implements ProductCategoryDAO {
  public ProductCategory create(final Procedure1<? super ProductCategory> updater) {ProductCategory productCategory=ProductCategoryImpl.create(getObjectFactory());
    final Procedure1<ProductCategory> _function = new Procedure1<ProductCategory>() {
        public void apply(final ProductCategory it) {
          updater.apply(it);
          it.checkValid();
        }
      };
    ProductCategory _doubleArrow = ObjectExtensions.<ProductCategory>operator_doubleArrow(productCategory, _function);
    return _doubleArrow;
  }
}
